# test.py
import sys
from gen import generate_case
from alg import find_subsequences

try:
    sys.stdout.reconfigure(encoding='utf-8')
except:
    pass  # Python <3.7 无需处理

if __name__ == "__main__":
    nums = generate_case()
    print("生成的整数数组为：", nums)

    result = find_subsequences(nums)
    print("找到的所有非递减子序列（长度≥2）如下：")
    for seq in result:
        print(seq)

    print(f"\n总共找到 {len(result)} 个非递减子序列。")
